﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DownloadTS
{
    class CompareFile : IComparable
    {
        public string Name { get; set; }
        public FileInfo File { get; set; }

        public CompareFile(FileInfo file)
        {
            this.File = file;
            if (file != null)
            {
                this.Name = file.Name;
            }
        }

        public int CompareTo(object obj)
        {
            if(obj is CompareFile)
            {
                CompareFile other = (CompareFile)obj;
                return this.Name.CompareTo(other.Name);
            }

            return 1;
        }
    }
}
